Skip to content

POC#405

Closed
pbartolome wants to merge 1 commit intostefanzweifel:masterfrom
pbartolome:poc/pr-write-token-check
Closed

POC#405
pbartolome wants to merge 1 commit intostefanzweifel:masterfrom
pbartolome:poc/pr-write-token-check

Conversation

@pbartolome
Copy link
Copy Markdown

@pbartolome pbartolome commented Apr 10, 2026

Tested the fork PR scenario to check if workflow is triggered. The repository requires manual approval of workflows coming from forks.

git-auto-commit.yml is still worth hardening. It runs on pull_request, asks for contents: write, checks out PR code, and then executes the local action with uses: ./. If a maintainer approved a malicious fork PR, that PR could run modified action code inside a workflow with write-level permissions.

Recommendations:

  1. Remove pull_request from git-auto-commit.yml, or only allow it for branches in the same repository.
  2. Keep manual approval enabled for workflows from forks.
  3. Avoid using uses: ./ in workflows that request write permissions.
  4. Set explicit minimal permissions in test workflows, such as contents: read.
  5. Protect release tags with tag protection or rulesets.

@pbartolome pbartolome closed this Apr 10, 2026
@pbartolome pbartolome deleted the poc/pr-write-token-check branch April 10, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant